/**
 * @class Tweet
 * @extends Ext.data.Model
 * 
 * The Tweet model uses a custom Gossips proxy (defined in lib/GossipsProxy.js as it is not part of a particular app).
 * The Gossips application doesn't use this model directly very much, relying instead on the hasMany association with
 * the Search model to load the Tweets for a given Search.
 * 
 */
Ext.regModel("Tweet", {
    fields: [
        {name: "id",                type: "int"},
        {name: "text",              type: "string"},
        //{name: "name",              type: "string", mapping: 'from_user'},
        //{name: "profile_image_url", type: "string", mapping: 'profile_image_url'},
        {name: "name",              type: "string", mapping: 'user.name'},
        {name: "profile_image_url", type: "string", mapping: 'user.profile_image_url'},
        {name: "created_at",        type: "string"}
    ],
    
    proxy: 'gossips'
});
